package cn.zpon.pay.demo.util;

/**
 * HTTP请求结果
 *
 */
public class HttpResponse {
	
	private int statusCode;  //状态码
	private String response; //请求结果
	
	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("{");
		sb.append("statusCode:").append(statusCode).append(", ");
		sb.append("response:").append(response);
		sb.append("}");
		return sb.toString();
	}
	
	public boolean isOk() {
		return (statusCode == 200);
	}
	
	public int getStatusCode() {
		return statusCode;
	}
	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}
	public String getResponse() {
		return response;
	}
	public void setResponse(String response) {
		this.response = response;
	}

}
